﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="edit.aspx.cs" Inherits="news_NewsReBK_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" language="javascript"></script>
    <style type="text/css">
        .style1
        {
            height: 30px;
        }
        </style>
    <link href="../../css/jquery-ui-1.7.3.custom.css" rel="Stylesheet" type="text/css" />
    <script src="../../js/jquery-ui-1.7.3.custom.min.js" language="javascript" type="text/javascript"></script>
    <script>
        $(document).ready(function () {
            $('#dialog').dialog({
                autoOpen: false,
                modal: true,
                width: 450,
                buttons: {
                    "取消": function () {

                        $(this).dialog("close");
                    },
                    "确定": function () {
                        var bkid = $("#hidBkId").val();
                        var key = $("#txtKey").val();
                        $.post("addKey.ashx", { key: key, bkid: bkid }, function (data) {
                            if (data == "0") {
                                alert("添加失败");
                            }
                            else {
                                alert("添加成功");
                                document.location = document.location;
                            }
                        })
                        $(this).dialog("close");
                    }
                }
            });
            $("#btnAdd").click(function () {
                $('#dialog').dialog("open");
            })
        }
           )
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="button_bar">
        <input value="添加" id="btnAdd" type="button" /> 板块名称：<asp:Label ID="lblBkName" 
            runat="server"></asp:Label>
    </div>
    <div>
         <table class="data_list_table">
            <tr>
                <th>
                    板块编号
                </th>
                <th>
                    板块名称
                </th>
                <th>
                    关联字符串
                </th>
                <th>
                    添加时间
                </th>
                <th>
                    操作
                </th>
            </tr>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <tr>
                        <td class="list_data_number">
                              <%# Eval("bkid") %>
                        </td>
                        <td class="list_data_text">
                            <%# Eval("BKNAME") %>
                        </td>
                        <td>
                            <%# Eval("key") %>
                        </td>
                        <td>
                            <%# Eval("CTime") %>
                        </td>
                        <td>
                            <a href='DelKey.aspx?id=<%# Eval("id") %>'>删除</a>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        <asp:HiddenField ID="hidBkId" runat="server" />
        <div id="dialog" title="提示消息">
        <table >
            <tr>
                <th class="style1">
                    关键字
                </th>
                <td class="style1">
                    <asp:TextBox ID="txtKey" runat="server" Width="349px" />
                </td>
            </tr>
        </table>
        </div>
    </div>
    </form>
</body>
</html>
